#include "udp_client.hpp"
#include <memory>
#include <signal.h>

void Usage(const char *command)
{
    std::cout << "/nUsage: " << command << " ip port\n" << std::endl; 
}

int main(int argc, const char **argv)
{
    if(argc != 3)
    {
        Usage(argv[0]);
        exit(1);
    }

    // signal(SIGCHLD, SIG_IGN);

    std::unique_ptr<Client> pcli(new Client(argv[1], atoi(argv[2])));
    pcli->init();
    pcli->start();

    return 0;
}